<?php
namespace cubox\provider\webpack;

class File{
    protected string $name = "";
    protected string $file = "";
    protected string $baseUrl  = "";
    protected string $webpackUrl  = "";
    protected array $param = array();
    public static array  $fileContent = [];
    public bool $useExport =  false;
    public bool $import = false;
    public function __construct(string $name,string $file,string $webpackUrl,array $param = array()){
        $this->name = $name;
        $this->file = $file;
        $this->param = $param;
        $this->baseUrl = dirname(str_replace(\cubox\File::cleanPath(RUN),'',\cubox\File::cleanPath($this->file)));
        $this->webpackUrl  =  $webpackUrl;
    }

    
    public function pack(){

    }

    protected function getFunctionName($path){
        return  'webpack_'.$this->name.'_'.md5($path);
    }
}